﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SF.Base.Core;

namespace SF.Dict.Web.UserControls {
	public partial class ucVocHeader : BaseControl {
		public string VocabularyId {
			get;
			set;
		}
		public string Initial {
			get;
			set;
		}
		public string PageName {
			get;
			set;
		}

		protected long Vid{
			get;
			set;
		}

		protected void Page_Load(object sender, EventArgs e) {
			if (!string.IsNullOrEmpty(VocabularyId)) {
				VocabularyEntity voc = VocabularyRules.GetVocabulary(VocabularyId);
				Vid = voc.Vid;
				hl_vocname.NavigateUrl = string.Format("/voc.aspx?vid={0}&index={1}", voc.Vid, Initial);
				hl_vocname.Text =  voc.Name;
				lbl_num.Text = "[NO." + voc.Vid + "]";

			}
		}
	}
}